package com.dtwave.wechat.service.provider.common.enums;

import java.io.Serializable;

public class Constants {
    
    //请求头参数
    public static final String PARAM_HEADER_REFERER = "Referer";
    public static final String PARAM_HEADER_ACCESSTOKEN = "accessToken";
    public static final String PARAM_HEADER_XREQUESTEDWITH = "X-Requested-With";
    
    //请求参数
    public static final String PARAM_PARAMETER_ACCESSTOKEN = "accessToken";
    public static final String PARAM_PARAMETER_AUTHTYPE = "authType";
    public static final String PARAM_PARAMETER_ORGID = "orgId";
    public static final String PARAM_PARAMETER_USERNAME = "username";
    public static final String PARAM_PARAMETER_PASSWORD = "password";
    public static final String PARAM_PARAMETER_CLIENTTYPE = "clientType";
    public static final String PARAM_PARAMETER_IMEI = "imei";
    public static final String PARAM_PARAMETER_BRAND = "brand";
    public static final String PARAM_PARAMETER_OS= "os";
    public static final String PARAM_PARAMETER_OSVERSION = "osversion";
    public static final String PARAM_PARAMETER_VERSION = "version";
    
    //session参数
    public static final String PARAM_SESSION_USERINFO = "userinfo_";
    public static final String PARAM_SESSION_ACTIONS = "actions_";
    public static final String PARAM_SESSION_AUTHINFO = "authinfo_";
    public static final String PARAM_SESSION_SHIRO_REDIS_SESSION = "shiro_redis_session:";
    
    //authType
    public static final int PARAM_AUTHTYPE_ACCESSTOKEN = 0;
    public static final int PARAM_AUTHTYPE_FORM = 1;
    public static final int PARAM_AUTHTYPE_AUTH_TWO = 2;
    public static final int PARAM_AUTHTYPE_WINDOWS_AD = 3;
    public static final int PARAM_AUTHTYPE_WEIXIN = 4;
    public static final int PARAM_AUTHTYPE_DINGTALK = 5;
    
    //clientType
    public static final String PARAM_CLIENTTYPE_PC = "pc";
    public static final String PARAM_CLIENTTYPE_IOS = "ios";
    public static final String PARAM_CLIENTTYPE_ANDROID = "android";
    
    
    //是否失效
    public static final int PARAM_IS_ACTIVE_ZERO = 0;
    public static final int PARAM_IS_ACTIVE_ONE = 1;
    
    public static final int PARAM_IS_READ_ZERO = 0;
    public static final int PARAM_IS_READ_ONE = 1;
    
    public static final int PARAM_IS_APP_ZERO = 0;
    public static final int PARAM_IS_APP_ONE = 1;
    
    public static final int PARAM_IS_SUCCESS_ZERO = 0;
    public static final int PARAM_IS_SUCCESS_ONE = 1;
    
    //语言
    public static final String PARAM_LANG_ZHS = "zhs";
    
    public static String getUserinfoKey(Serializable accessToken) {
    	return PARAM_SESSION_USERINFO + accessToken;
    }
    
    public static String getActionsKey(Serializable accessToken) {
    	return PARAM_SESSION_ACTIONS + accessToken;
    }
    
    public static String getShiroSessionKey(Serializable accessToken) {
    	return PARAM_SESSION_SHIRO_REDIS_SESSION + accessToken;
    }
    
    public static String getAuthinfoKey(Serializable accessToken) {
    	return PARAM_SESSION_AUTHINFO + accessToken;
    }
}
